package com.hsd.web.survey.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hsd.web.WEBSURVEYCONSTANTS;
import com.hsd.web.WebBaseAction;
import com.hsd.web.survey.service.IWebSurveyService;


@Controller
@RequestMapping("/web")
public class WebSurveyAction extends WebBaseAction{
	@Autowired
	private IWebSurveyService wsService;
 
	public void setWsService(IWebSurveyService wsService) {
		this.wsService = wsService;
	} 
	/**
	 * 健康管理 ：填写问卷
	 * @param pageParams
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping(value = "/doSurvey.do")
	public String doSurvey(HttpServletRequest request,ModelMap model){
		String surveyid = request.getParameter("surveyid");
		surveyid = WEBSURVEYCONSTANTS.SURVEY_FIVE2STEP + "";
		List questionList = this.wsService.findList(" from HsdWebQuestions where surveyid= "+surveyid);
		model.put("qlist", questionList); 
		return "web/survey/web-survey-info";
	}
	 
	 
}
